package priv.pattern.staticproxy.staticagency;


import priv.pattern.staticproxy.staticagency.service.AccountService;
import priv.pattern.staticproxy.staticagency.service.impl.AccountIServiceImpl;

/*
 * 作者：m鹏h
 * 时间；2024/7/24 21:57
 * 描述：账户代理类
 **/
public class AccountProxy implements AccountService {


    private AccountIServiceImpl accountIServiceImpl;
    public AccountProxy(AccountIServiceImpl accountIServiceImpl) {
        this.accountIServiceImpl = accountIServiceImpl;
    }
    @Override
    public void queryAccount() {
        System.out.println("查询账户预处理");
        accountIServiceImpl.queryAccount();
        System.out.println("查询账户之后");
    }

    @Override
    public void updateAccount() {
        System.out.println("修改账户预处理");
        accountIServiceImpl.queryAccount();
        System.out.println("修改账户之后");
    }
}
